import request from "@/utils/request";

//添加接口
export function addCase(params) {
    return request({
        url: '/cases/create',
        method: 'post',
        data: params
    })
}

//删除接口
export function deleteCase(id) {
    return request({
        url: `/cases/delete/${id}`,
        method: 'delete'
    })
}
//更新接口
export function updateCase(data) {
    return request({
        url: '/cases/update',
        method: 'post',
        data: data
    })
}

//获取接口下用例
export function getCase(interfaceId, id, pageIndex, pageSize) {
    return request({
        url: '/cases/list',
        method: 'get',
        params: {
            interfaceId,
            id,
            pageIndex,
            pageSize
        }

    })
}